package com.dubbo.controller;

import com.dubbo.service.RemoteUserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = "start")
public class RemoteUserController {

    @Reference(version="1.0.0")
    private RemoteUserService remoteUserService;

    @RequestMapping(value = "remote")
    @ResponseBody
    public String RemoteUser(@RequestParam("name") String name){
        return remoteUserService.sayHello(name);
    }
}
